import java.awt.*;
import java.awt.event.*;

import java.applet.*;

public class M209Applet extends Applet implements ActionListener{

    /**
     * serial ID
     */
    private static final long serialVersionUID = -4316982731468739714L;

    TextField inputLine = new TextField(15);
    TextField inputLine2 = new TextField(15); 
    
    public M209Applet() {
        add(inputLine);
        add(inputLine2);
        inputLine.addActionListener(this);
        inputLine2.addActionListener(this);
    }
    
    public void actionPerformed(ActionEvent event) {
        String s = inputLine.getText();
        String sUp = s.toUpperCase();
        inputLine2.setText(sUp);
    } 
    
    
    public void paint(Graphics g) {
	g.drawString("First Applet", 50, 50);
	g.setColor(Color.red);
	g.drawRect(10, 10, 100, 50);
    }
}
